<?php

/**
 * Класс описания микроданных для поисковиков
 * Тип GeoCoordinates
 *
 * @author xStream
 * @version 1.0.0
 */

class Microdata_Address extends Microdata_Base {
	const google_type = 'PostalAddress';
	
	public function __construct(BaseHotel $objHotel = null) {
		if(!$objHotel) return;
	
		$this->streetAddress = View_Hotel::getAddressHotel($objHotel->tableFields);
		$this->addressCountry = strtoupper($objHotel->getField('country_code'));
		$city = new City($objHotel->tableFields['ID_city']);
		$this->addressLocality = View_City::getName($city->tableFields);
		
		$this->valid = true;
	}
}